package com.yulongtian.oneProblemEveryDay.month202211.day20220826;

/**
 * https://leetcode.cn/problems/maximum-product-of-two-elements-in-an-array/
 * @author YulongTian
 * @date 2022/8/26 - 9:07
 */
public class Test01 {

    public static void main(String[] args) {

    }

    public int maxProduct(int[] nums) {
        int res=Integer.MIN_VALUE;
        for(int i=0;i<nums.length;i++){
            for(int j=i+1;j<nums.length;j++){
                if(res<(nums[i]-1)*(nums[j]-1)){
                    res=(nums[i]-1)*(nums[j]-1);
                }
            }
        }
        return res;
    }




}
